﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="TutorInputReview.aspx.cs" Inherits="TutorInputReview" %>


<asp:Content ID="Content1" runat="server" contentplaceholderid="PageBody">

    <asp:Label ID="TutorEditReview" runat="server" Text="Tutor edit student review"></asp:Label>
    </br>
    </br>
    <asp:Label ID="GroupName" runat="server" Text="Group Name"></asp:Label>
    <asp:DropDownList ID="GroupNameDropDown" runat="server" Width="202px"
        onselectedindexchanged="GroupNameDropDown_SelectedIndexChanged"
        AutoPostBack="True" DataSourceID="TeamDropDownDataSource"
        DataTextField="group_name" DataValueField="group_name" 
        AppendDataBoundItems="True">
    <asp:ListItem Value="-1" Text="Choose a group..." />
    </asp:DropDownList>

    <asp:SqlDataSource ID="TeamDropDownDataSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:INB201ConnectionString %>" 
        
        SelectCommand="SELECT DISTINCT [group_name] FROM [users] WHERE ([group_name] IS NOT NULL)">
    </asp:SqlDataSource>

    </br>
                <asp:Label ID="week" runat="server" Text="Week"></asp:Label>
    <asp:DropDownList ID="WeekDropDown" runat="server" Width="202px" 
        AutoPostBack="True" Enabled="False" 
        onselectedindexchanged="WeekDropDown_SelectedIndexChanged">
        <asp:ListItem>1</asp:ListItem>
        <asp:ListItem>2</asp:ListItem>
        <asp:ListItem>3</asp:ListItem>
        <asp:ListItem>4</asp:ListItem>
        <asp:ListItem>5</asp:ListItem>
        <asp:ListItem>6</asp:ListItem>
        <asp:ListItem>7</asp:ListItem>
        <asp:ListItem>8</asp:ListItem>
        <asp:ListItem>9</asp:ListItem>
        <asp:ListItem>10</asp:ListItem>
        <asp:ListItem>11</asp:ListItem>
        <asp:ListItem>12</asp:ListItem>
        <asp:ListItem>13</asp:ListItem>
    </asp:DropDownList>

    <br />

    </br>
    <table style="width: 100%;">
        <tr>
            <td class="style2">
                &nbsp;
                <asp:Label ID="groupmembers" runat="server" Text="Group Member"></asp:Label>
                s</td>
            <td class="style6">
                &nbsp;
                <asp:Label ID="Grade" runat="server" Text="Grade"></asp:Label>
            </td>
            <td class="CommentLabel">
                <asp:Label ID="Comment" runat="server" Text="Comment"></asp:Label>
            </td>
        </tr>
        <tr>
            <td class="style3">
                    <asp:TextBox ID="StudentNameTextBox1" runat="server" Width="129px" 
                    Enabled="False"></asp:TextBox>
                    <asp:TextBox ID="StudentNumberTextBox1" runat="server" MaxLength="7" 
                        Width="137px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style7">
                    <asp:DropDownList ID="GradeList1" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
            </td>
            <td>
                <asp:TextBox ID="CommentsTextBox1" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style12">
                    <asp:TextBox ID="StudentNameTextBox2" runat="server" Width="129px" 
                    Enabled="False"></asp:TextBox>
                    <asp:TextBox ID="StudentNumberTextBox2" runat="server" MaxLength="7" 
                        Width="137px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style13">
                    <asp:DropDownList ID="GradeList2" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
            </td>
            <td class="style14">
                <asp:TextBox ID="CommentsTextBox2" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                    <asp:TextBox ID="StudentNameTextBox3" runat="server" Width="129px" 
                    Enabled="False"></asp:TextBox>
                    <asp:TextBox ID="StudentNumberTextBox3" runat="server" MaxLength="7" 
                        Width="137px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style7">
                    <asp:DropDownList ID="GradeList3" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
            </td>
            <td>
                <asp:TextBox ID="CommentsTextBox3" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                    <asp:TextBox ID="StudentNameTextBox4" runat="server" Width="129px" 
                    Enabled="False"></asp:TextBox>
                    <asp:TextBox ID="StudentNumberTextBox4" runat="server" MaxLength="7" 
                        Width="137px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style7">
                    <asp:DropDownList ID="GradeList4" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
            </td>
            <td>
                <asp:TextBox ID="CommentsTextBox4" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style3">
                    <asp:TextBox ID="StudentNameTextBox5" runat="server" Width="129px" 
                    Enabled="False"></asp:TextBox>
                    <asp:TextBox ID="StudentNumberTextBox5" runat="server" MaxLength="7" 
                        Width="137px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style7">
                    <asp:DropDownList ID="GradeList5" runat="server">
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
            </td>
            <td>
                <asp:TextBox ID="CommentsTextBox5" runat="server" Width="400px"></asp:TextBox>
            </td>
        </tr>
        </table>
    </br>


    <asp:Button ID="SubmitStudentReviewButton" runat="server" onclick="SubmitStudentReviewButton_Click" 
        Text="Submit" />
    </br>
    <asp:Label ID="SubmitStatusLabel" runat="server" Text="status"></asp:Label>

    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="week,user_id" DataSourceID="TutorReviewSource">
        <Columns>
            <asp:BoundField DataField="week" HeaderText="Week" ReadOnly="True" 
                SortExpression="week" />
            <asp:BoundField DataField="user_name" HeaderText="Name" ReadOnly="True" 
                SortExpression="user_name" />
            <asp:BoundField DataField="user_id" HeaderText="Student ID" ReadOnly="True" 
                SortExpression="user_id" />
            <asp:TemplateField HeaderText="Mark">
                <EditItemTemplate>
                    <asp:DropDownList ID="DropDownList2" runat="server" 
                        SelectedValue='<%# Bind("mark") %>'>
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:DropDownList ID="DropDownList1" runat="server" Enabled="<%# false %>" 
                        SelectedValue='<%# Bind("mark") %>'>
                        <asp:ListItem>0</asp:ListItem>
                        <asp:ListItem>1</asp:ListItem>
                        <asp:ListItem>2</asp:ListItem>
                        <asp:ListItem>3</asp:ListItem>
                        <asp:ListItem>4</asp:ListItem>
                        <asp:ListItem>5</asp:ListItem>
                        <asp:ListItem>6</asp:ListItem>
                        <asp:ListItem>7</asp:ListItem>
                        <asp:ListItem>8</asp:ListItem>
                        <asp:ListItem>9</asp:ListItem>
                        <asp:ListItem>10</asp:ListItem>
                    </asp:DropDownList>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="comment" HeaderText="Comment" 
                SortExpression="comment" />
            <asp:CommandField ButtonType="Button" ShowEditButton="True" />
        </Columns>
    </asp:GridView>
    <br />
    <asp:SqlDataSource ID="TutorReviewSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:INB201ConnectionString %>" 
        SelectCommand="SELECT * FROM [tutorresults]"></asp:SqlDataSource>

    </br>
    </br>
    





</asp:Content>

<asp:Content ID="Content2" runat="server" contentplaceholderid="HeadContent">
    <style type="text/css">
        .style2
        {
            height: 21px;
            width: 300px;
        }
        .style3
        {
            width: 300px;
        }
        .style6
        {
            height: 21px;
            width: 55px;
        }
        .style7
        {
            width: 55px;
        }
        .style12
        {
            width: 300px;
            height: 26px;
        }
        .style13
        {
            width: 55px;
            height: 26px;
        }
        .style14
        {
            height: 26px;
        }
    </style>
</asp:Content>




